<?php
    echo "<table>
        <thead>
            <tr>
                <th>Имя</th>
                <th>E-mail</th>
                <th>Кол-во активных задач</th>
            </tr>
        </thead>";
    $query = "SELECT display_name, user_email, user_orders FROM crm_users";
    $result = mysql_query($query);
    while ($row = mysql_fetch_array($result))
    {
        echo "<tbody>
            <tr>
                <td>".$row['display_name']."</td>
                    <td><a href=\"mailto:".$row['user_email']."\">".$row['user_email']."</a></td>
                        <td style='text-align: center'>".$row['user_orders']."</td>
                    </tr>
                </tbody>";
    }
    echo "</table>";
?>